package com.bjh.dao;

import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface BusinessDao {
    /**
     * 根据代理商id获取分组
     * @param params 相关参数
     * @return {@link List}
     * @throws Exception Exception
     */
    List<?> getGroupByAgentId (Map<String, Object> params) throws Exception;

    /**
     * 根据代理商id获取分组数量
     * @param params 相关参数
     * @return {@link Long}
     * @throws Exception Exception
     */
    Long getGroupCountByAgentId (Map<String, Object> params) throws Exception;

    /**
     * 根据id查询分组详情
     * @param id 分组id
     * @return {@link Map}
     * @throws Exception Exception
     */
    Map<String, Object> getGroupById (Long id) throws Exception;

    /**
     * 添加分组
     * @param params 相关参数
     * @throws Exception Exception
     */
    void addGroup (Map<String, Object> params) throws Exception;

    /**
     * 修改分组
     * @param params 相关参数
     * @throws Exception Exception
     */
    void updateGroup (Map<String, Object> params) throws Exception;

    /**
     * 根据分组id获取商户数量
     * @param id 分组id
     * @return {@link Long}
     * @throws Exception Exception
     */
    Long getBusinessCountById(Long id) throws Exception;
    /**
     * 删除分组
     * @param id 分组id
     * @throws Exception Exception
     */
    void deleteGroup (Long id) throws Exception;

    /**
     * 根据代理商id获取商户列表
     * @param params 相关参数
     * @return {@link List}
     * @throws Exception Exception
     */
    List<?> getBusinessByAgentId (Map<String, Object> params) throws Exception;

    /**
     * 根据代理商id获取商户数量
     * @param params 相关参数
     * @return {@link Long}
     * @throws Exception Exception
     */
    Long getBusinessCountByAgentId (Map<String, Object> params) throws Exception;

    /**
     * 添加商户
     * @param params 相关参数
     * @throws Exception Exception
     */
    void addBusiness (Map<String, Object> params) throws Exception;

    /**
     * 修改商户
     * @param params 相关参数
     * @throws Exception Exception
     */
    void updateBusiness (Map<String, Object> params) throws Exception;

    /**
     * 获取分组选项
     * @param agentId 代理商id
     * @return {@link List}
     * @throws Exception Exception
     */
    List<?> getGroupOption (Long agentId) throws Exception;
}
